<script>
    window.onload = function (ev) {
        $('.delete').click(function () {
            var nodeId = $(this).attr('nodeId');
            xhExtra.askChangeStatus('grade/delGrade',{id:nodeId},null,'确认要删除嘛？',function (res) {
                window.top.xhTop.showSuccess(res.msg);
                window.location.reload();
            })
        })
    }
</script>
<style>
    a {
        cursor:pointer;
    }
</style>
<table class="table table-hover">
    <tr class="info">
        <th style="width: 30%;">月份</th>
        <th>得分</th>
        <th>创建人</th>
        <th>最后修改时间</th>
        <th>操作</th>
    </tr>
    {% if grades | length <= 0 %}
        <tr><td colspan="4">没有数据</td></tr>
    {% else %}
        {% for index,row in grades %}
            <tr>
                <td>{{ row['sMonth'] }}</td>
                <td>{{ row['iGrade'] }}</td>
                <td>{{ row['iCreateUserId'] }}</td>
                <td>{{ row['tLastModifyDate'] }}</td>
                <td>
                    <a class="delete" nodeId="{{ row['iRecId'] }}">删除</a>
                </td>
            </tr>
        {% endfor %}
    {% endif %}
</table>